﻿using System.Collections.Generic;
using System.Linq;
using System.Windows.Controls;

namespace content.A05
{
    public partial class A0503:Page
    {
        public A0503()
        {
            InitializeComponent();

            SortedList<int,string> list=new SortedList<int,string>
            {
                {10,"str10"},
                {2,"str2"},
                {13,"str13"},
                {24,"str24"},
                {15,"str15"}
            };
            TextBlock1.Text="Key\t Value\n";
            TextBlock1.Text+=new string('-',20)+"\n";
            var result=list.Reverse();
            foreach(var v in result)
                TextBlock1.Text+=$"{v.Key}\t{v.Value}\n";
        }
    }
}